﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAAC.DTO;
using SAAC.DAL;

namespace SAAC.BLL
{
    public class AlunoBLL
    {
        protected AlunoDAL _alunoDAL;

        public AlunoBLL()
        {
            if (_alunoDAL == null)
                _alunoDAL = new AlunoDAL();
        }

        public AlunoDTO Select(AlunoDTO dto, string order = null)
        {
            try
            {
                return _alunoDAL.Select(dto, order);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<AlunoDTO> SelectAll(AlunoDTO dto, string order = null, int limit = 1000)
        {
            try
            {
                return _alunoDAL.SelectAll(dto, order, limit);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Insert(AlunoDTO dto)
        {
            try
            {
                _alunoDAL.Insert(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Update(AlunoDTO dto)
        {
            try
            {
                _alunoDAL.Update(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Delete(AlunoDTO dto)
        {
            try
            {
                _alunoDAL.Delete(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
